#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
double fact(int n)  //求阶乘的函数
{
	double sul = 1;
	for (int i = 2; i <= n; i++)
		sul *= i;
	return sul;
}

int main()
{
	int n;
	double sum = 1;
	scanf("%d", &n);

	for (int i = 1; i <= n; i++)
		sum += 1 / fact(i);

	printf("%.8lf", sum);
	return 0;
}